package com.ehotting.edsta.circuitDesign.bean;

import com.alibaba.fastjson.annotation.JSONField;
import com.ehotting.edsta.circuitDesign.bean.response.ResponseExecute;
import com.fasterxml.jackson.annotation.JsonProperty;

import java.util.List;
import java.util.Map;

public class CircuitData {

    private Map<String,Map<String,String>> circuitTemplateNames;
    private String name; // 工程名称
    private String uuid; // 工程id
    private List<String> projectFiles; // 模板工程地址
    private List<String> PCBFiles; //pcb模板工程地址
    private List<String> images; // 缩略图地址
    private String description; // 描述
    private List<List<BomData>> bom; // 物料（元器件列表）
    private String thumb; // 方案封面图地址
    private String charts; // 图表地址，不用了
    private List<String> tags; // 模板工程的分类标签
    private ParametersData parameters; // 模板工程预览弹出展示的关键特征参数展示
    private List<List<List<String>>> replaceNets; // 网络替换
    private List<List<List<String>>> replaceDesignators; // 位号替换
    private List<UDriveContrast> uDriveContrastList;//u型处理器驱动
    private String driveData;//驱动组装数据
    private int pcbExist = 0; // pcb匹配是否成功 1：成功 0：失败

    public int getPcbExist() {
        return pcbExist;
    }

    public void setPcbExist(int pcbExist) {
        this.pcbExist = pcbExist;
    }

    public List<String> getPCBFiles() {
        return PCBFiles;
    }

    public void setPCBFiles(List<String> PCBFiles) {
        this.PCBFiles = PCBFiles;
    }

    public String getDriveData() {
        return driveData;
    }

    public void setDriveData(String driveData) {
        this.driveData = driveData;
    }

    public List<UDriveContrast> getuDriveContrastList() {
        return uDriveContrastList;
    }

    public void setuDriveContrastList(List<UDriveContrast> uDriveContrastList) {
        this.uDriveContrastList = uDriveContrastList;
    }

    public Map<String,Map<String,String>> getCircuitTemplateNames() {
        return circuitTemplateNames;
    }

    public void setCircuitTemplateNames(Map<String,Map<String,String>> circuitTemplateNames) {
        this.circuitTemplateNames = circuitTemplateNames;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getUuid() {
        return uuid;
    }


    public void setUuid(String uuid) {
        this.uuid = uuid;
    }

    public List<String> getProjectFiles() {
        return projectFiles;
    }

    public void setProjectFiles(List<String> projectFiles) {
        this.projectFiles = projectFiles;
    }

    public List<String> getImages() {
        return images;
    }

    public void setImages(List<String> images) {
        this.images = images;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public List<List<BomData>> getBom() {
        return bom;
    }

    public void setBom(List<List<BomData>> bom) {
        this.bom = bom;
    }

    public String getThumb() {
        return thumb;
    }

    public void setThumb(String thumb) {
        this.thumb = thumb;
    }

    public String getCharts() {
        return charts;
    }

    public void setCharts(String charts) {
        this.charts = charts;
    }

    public List<String> getTags() {
        return tags;
    }

    public void setTags(List<String> tags) {
        this.tags = tags;
    }

    public ParametersData getParameters() {
        return parameters;
    }

    public void setParameters(ParametersData parameters) {
        this.parameters = parameters;
    }

    public List<List<List<String>>> getReplaceNets() {
        return replaceNets;
    }

    public void setReplaceNets(List<List<List<String>>> replaceNets) {
        this.replaceNets = replaceNets;
    }

    public List<List<List<String>>> getReplaceDesignators() {
        return replaceDesignators;
    }

    public void setReplaceDesignators(List<List<List<String>>> replaceDesignators) {
        this.replaceDesignators = replaceDesignators;
    }

    public static class UDriveContrast{
        private String comment;
        private int isSupported;//是否支持 0:不存在  1：支持  -1：不支持

        public String getComment() {
            return comment;
        }

        public void setComment(String comment) {
            this.comment = comment;
        }

        public int getIsSupported() {
            return isSupported;
        }

        public void setIsSupported(int isSupported) {
            this.isSupported = isSupported;
        }
    }

    public static class BomData {
        private String id; // id
        @JsonProperty("Designator")
        private String designator; // 位号
        @JsonProperty("Footprint")
        private String footprint; //封装名
        @JsonProperty("Device")
        private String device; //封装名
        @JsonProperty("Name")
        private String name; // 元件名
        @JsonProperty("Value")
        private String value; // 值
        private String unit; // 单位
        private Double price; // 价格
        private Double area; // 面积
        private Integer number; // 数量
        private String comment; // 元器件编码

        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }
//        @JSONField(name="Designator")
        public String getDesignator() {
            return designator;
        }
//        @JSONField(name="Designator")
        public void setDesignator(String designator) {
            this.designator = designator;
        }
//        @JSONField(name="Footprint")
        public String getFootprint() {
            return footprint;
        }
//        @JSONField(name="Footprint")
        public void setFootprint(String footprint) {
            this.footprint = footprint;
        }
//        @JSONField(name="Device")
        public String getDevice() {
            return device;
        }
//        @JSONField(name="Device")
        public void setDevice(String device) {
            this.device = device;
        }

//        @JSONField(name="Name")
        public String getName() {
            return name;
        }
//        @JSONField(name="Name")
        public void setName(String name) {
            this.name = name;
        }
//        @JSONField(name="Value")
        public String getValue() {
            return value;
        }
//        @JSONField(name="Value")
        public void setValue(String value) {
            this.value = value;
        }

        public String getUnit() {
            return unit;
        }

        public void setUnit(String unit) {
            this.unit = unit;
        }

        public Double getPrice() {
            return price;
        }

        public void setPrice(Double price) {
            this.price = price;
        }

        public Double getArea() {
            return area;
        }

        public void setArea(Double area) {
            this.area = area;
        }

        public Integer getNumber() {
            return number;
        }

        public void setNumber(Integer number) {
            this.number = number;
        }

        public String getComment() {
            return comment;
        }

        public void setComment(String comment) {
            this.comment = comment;
        }
    }

    public static class ParametersData{
        private String efficiency; // 效率
        private Double materialCost; // 物料成本
        private Double area; // 物料总面积

        public String getEfficiency() {
            return efficiency;
        }

        public void setEfficiency(String efficiency) {
            this.efficiency = efficiency;
        }

        public Double getMaterialCost() {
            return materialCost;
        }

        public void setMaterialCost(Double materialCost) {
            this.materialCost = materialCost;
        }

        public Double getArea() {
            return area;
        }

        public void setArea(Double area) {
            this.area = area;
        }
    }
}
